import Vue from 'vue'
import Router from 'vue-router'
import index from '@/view/index'
import zcIndex from '@/view/zc/index'
import projectItem from '@/view/zc/zhongchouGood/zhongchouGood.vue'
import order from '@/view/zc/orders/order.vue'
import orderDesc from '@/view/zc/orders/orderDesc.vue'
import addAddr from '@/view/zc/addAddr/addAddr.vue'
import confirmOrder from '@/view/zc/orders/confirmOrder'
import addrList from '@/view/zc/addrList/addrList.vue'
import paySuccess from '@/view/zc/orders/paySuccess.vue'
import login from '@/view/zc/login/login.vue'
import chayangIndex from '@/view/chayang/index'
import confirmGet from '@/view/chayang/confirmGet/confirmGet'
import chayangItem from '@/view/chayang/itempage/itempage'
import addComment from '@/view/addComment/addComment'
import mid_autumn from '@/view/mid-autumn/index';
import detailPage from '@/view/mid-autumn/detailPage'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/zcIndex'
    },
    {
      path: '/index',
      name: '微商城首页',
      component: index
    },
    // 登录
    {
      path: '/login',
      name: '登录',
      component: login
    },
    // 茶样首页
    {
      path: '/chayang',
      name: '茶样首页',
      component: chayangIndex
    },
    // 茶样详情页
    {
      path: '/chayangItem',
      name: '茶样详情页',
      component: chayangItem
    },
    // 确认领取
    {
      path: '/confirmGet',
      name: '确认领取',
      component: confirmGet
    },
    // 添加评价
    {
      path: '/addComment',
      name: '提交评价',
      component: addComment
    },
    // 众筹首页
    {
      path: '/zcIndex',
      name: '众筹首页',
      component: zcIndex
    },
    // 众筹产品详情页
    {
      path: '/projectItem',
      name: '众筹详情页',
      component: projectItem,
    },
    // 众筹订单列表
    {
      path: '/order',
      name: '众筹订单列表',
      component: order
    },
    // 众筹订单详情
    {
      path: '/orderDesc',
      name: '订单详情',
      component: orderDesc
    },
    // 添加收货地址
    {
      path: '/addAddr',
      name: '添加收货地址',
      component: addAddr
    },
    // 确认订单
    {
      path: '/confirmOrder/:id/:num/:price/:package/:package_id/:menu_id',
      name: '确认订单',
      component: confirmOrder
    },
    //收货地址列表
    {
      path: '/addrList',
      name: '收货地址列表',
      component: addrList
    },
    // 付款成功
    {
      path: '/paySuccess/:order_no',
      name: '付款成功',
      component: paySuccess
    },
    // 中秋活动页首页
    {
      path: '/mid-autumn',
      name: '中秋活动页首页',
      component: mid_autumn
    },
    {
      path: '/mid-autumn_good_item',
      name: '中秋详情页',
      component: detailPage
    }
  ]
})
